/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package es.unavarra.mti.iws;

import javax.swing.UIManager;

/**
 *
 * @author marcelo
 */
public class Main {
    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        setLookAndFeel("nimbus");
        Manager m = new Manager();
        m.start();
    }

    public static void setLookAndFeel(String shortName) {
        UIManager.LookAndFeelInfo plafinfo[] = UIManager.getInstalledLookAndFeels();
        boolean nimbusfound = false;
        int nimbusindex = 0;

        for (int look = 0; look < plafinfo.length; look++) {
            if (plafinfo[look].getClassName().toLowerCase().contains(shortName)) {
                nimbusfound = true;
                nimbusindex = look;
                break;
            }
        }

        try {
            if (nimbusfound) {
                UIManager.setLookAndFeel(plafinfo[nimbusindex].getClassName());
            } else {
                UIManager.setLookAndFeel(
                        UIManager.getCrossPlatformLookAndFeelClassName());
            }

        } catch (Exception e) {
        }
    }

}
